import React, { useState, useEffect } from 'react';
import { Modal, Button } from 'antd';

export default function Detail(props) {
  const [details, setDetails] = useState({});
  useEffect(() => {
    setDetails(props.details);
  }, []);
  return (
    <>
      <Modal
        destroyOnClose={true}
        title="商铺详情"
        centered
        visible={props.visible}
        onOk={() => props.closeModal()}
        onCancel={() => props.closeModal()}
        width={800}
        footer={null}
      >
        <p>商铺名称：{details.shopName}</p>
        <p>商铺账户：{details.account}</p>
        <p>商铺地址：{details.address}</p>
        <p>手机号码：{details.telephone}</p>
        <p>营业执照：{details.licence}</p>
        <p>商铺金额：{details.money}</p>
        <p>店长姓名：{details.managerName}</p>
        <p>身份证号：{details.idcard}</p>
        <p>营业时间：{details.startTime}</p>
      </Modal>
    </>
  );
}
